package com.employeemanage.domain.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;

/**
 * 员工排班表
 * @TableName tbl_employee_schedule
 */
@TableName(value ="tbl_employee_schedule")
public class TblEmployeeSchedule {
    /**
     * 排班编号
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 员工ID
     */
    private Long employeeId;

    /**
     * 排班日期
     */
    private Date scheduleDate;

    /**
     * 班次类型
     */
    private String shiftType;

    /**
     * 排班时间
     */
    private Date scheduledAt;

    /**
     * 排班编号
     */
    public Long getId() {
        return id;
    }

    /**
     * 排班编号
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 员工ID
     */
    public Long getEmployeeId() {
        return employeeId;
    }

    /**
     * 员工ID
     */
    public void setEmployeeId(Long employeeId) {
        this.employeeId = employeeId;
    }

    /**
     * 排班日期
     */
    public Date getScheduleDate() {
        return scheduleDate;
    }

    /**
     * 排班日期
     */
    public void setScheduleDate(Date scheduleDate) {
        this.scheduleDate = scheduleDate;
    }

    /**
     * 班次类型
     */
    public String getShiftType() {
        return shiftType;
    }

    /**
     * 班次类型
     */
    public void setShiftType(String shiftType) {
        this.shiftType = shiftType;
    }

    /**
     * 排班时间
     */
    public Date getScheduledAt() {
        return scheduledAt;
    }

    /**
     * 排班时间
     */
    public void setScheduledAt(Date scheduledAt) {
        this.scheduledAt = scheduledAt;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TblEmployeeSchedule other = (TblEmployeeSchedule) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getEmployeeId() == null ? other.getEmployeeId() == null : this.getEmployeeId().equals(other.getEmployeeId()))
            && (this.getScheduleDate() == null ? other.getScheduleDate() == null : this.getScheduleDate().equals(other.getScheduleDate()))
            && (this.getShiftType() == null ? other.getShiftType() == null : this.getShiftType().equals(other.getShiftType()))
            && (this.getScheduledAt() == null ? other.getScheduledAt() == null : this.getScheduledAt().equals(other.getScheduledAt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getEmployeeId() == null) ? 0 : getEmployeeId().hashCode());
        result = prime * result + ((getScheduleDate() == null) ? 0 : getScheduleDate().hashCode());
        result = prime * result + ((getShiftType() == null) ? 0 : getShiftType().hashCode());
        result = prime * result + ((getScheduledAt() == null) ? 0 : getScheduledAt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", employeeId=").append(employeeId);
        sb.append(", scheduleDate=").append(scheduleDate);
        sb.append(", shiftType=").append(shiftType);
        sb.append(", scheduledAt=").append(scheduledAt);
        sb.append("]");
        return sb.toString();
    }
}
